#pragma once

#include <vector>

class CrossEntropyLoss
{
public:
    CrossEntropyLoss() = default;
    virtual ~CrossEntropyLoss() = default;

    void forward(const std::vector<double>& input, const std::vector<double>& label, double& loss);

    void forward(const std::vector<std::vector<double>>& inputs, const std::vector<std::vector<double>>& labels, double& loss);
    std::vector<std::vector<double>> backward();
private:
        std::vector<double> backward(const std::vector<double>& input, const std::vector<double>& label);
private:
    std::vector<std::vector<double>> input_batch_{};
    std::vector<std::vector<double>> label_batch_{};
};
